package com.foreknow.elmboot.controller;


import com.foreknow.elmboot.po.Cart;
import com.foreknow.elmboot.service.CartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("/CartController")
public class CartController {
    @Autowired
    private CartService cartService;
    @RequestMapping("listCart")
    public Object listCart(Cart cart){
        return cartService.slistCart(cart);
    }
    @RequestMapping("saveCart")
    public Object saveCart(Cart cart){
        return cartService.ssaveCart(cart);
    }
    @RequestMapping("updateCart")
    public Object updateCart(Cart cart){
        return cartService.supdateCart(cart);
    }
    @RequestMapping("removeCart")
    public Object removeCart(Cart cart){
        return cartService.sremoveCart(cart);
    }
}
